#ifndef  NONSASLAUTHENTICATION_INC
#define  NONSASLAUTHENTICATION_INC

#include <string>

#include "UserAuthentication.h"

class XMPPConnection;

/**
 * Implementation of JEP-0078: Non-SASL Authentication. Follow the following
 * <a href=http://www.jabber.org/jeps/jep-0078.html>link</a> to obtain more
 * information about the JEP.
 *
 * @author Gaston Dombiak
 */
class NonSASLAuthentication : public UserAuthentication {
public:
	NonSASLAuthentication(XMPPConnection * connection) : connection(connection) {}
	std::string authenticate(std::string & username, std::string & password, std::string & resource) ;
	std::string authenticateAnonymously() ;
	
private:
	XMPPConnection * connection;
};

#endif   /* ----- #ifndef NONSASLAUTHENTICATION_INC  ----- */

